<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('未完成月度评价供电所列表')"/>
</head>
<body class="pear-container">
<div class="layui-card">
    <!--    <div class="layui-card-body">-->
    <!--        <form class="layui-form" action="">-->
    <!--            <div class="layui-form-item">-->
    <!--                <label class="layui-form-label">供电所名称</label>-->
    <!--                <div class="layui-input-inline">-->
    <!--                    <input type="text" name="supplyName" placeholder="" class="layui-input">-->
    <!--                </div>-->
    <!--                <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit-->
    <!--                        lay-filter="fillplan-query">-->
    <!--                    <i class="layui-icon layui-icon-search"></i>-->
    <!--                    查询-->
    <!--                </button>-->
    <!--                <button type="reset" class="pear-btn pear-btn-md">-->
    <!--                    <i class="layui-icon layui-icon-refresh"></i>-->
    <!--                    重置-->
    <!--                </button>-->
    <!--            </div>-->
    <!--        </form>-->
    <!--    </div>-->
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table id="fillplan-table" lay-filter="fillplan-table"></table>
    </div>
</div>
</body>

<script id="taskFillingScore-bar3" type="text/html">
    {{#if(d.taskState != 0 ){ }}
    <img th:src="@{/static/admin/images/img/carryOut.png}" class="layui-nav-img">
    {{# }else{ }}
    <img th:src="@{/static/admin/images/img/notCarryOut.png}" class="layui-nav-img">
    {{# } }}
</script>


<th:block th:include="include :: footer"/>
<script th:inline="javascript" type="text/javascript">
    /*<![CDATA[*/
    var evaluationId = /*[[${evaluationId}]]*/ 20;
    /*]]>*/

    /*<![CDATA[*/
    var fkSubcompanyId = /*[[${fkSubcompanyId}]]*/ 20;
    /*]]>*/

    layui.use(['table', 'form', 'jquery'], function () {
        var table = layui.table;
        var form = layui.form;
        var $ = layui.jquery;
        var MODULE_PATH = rootPath + "/MonthSupplytaskController/";
        var cols = [
            [

                {title: '供电所名称', field: 'supplyName', align: 'center'},

                {
                    field: 'taskState', title: '当前状态', align: 'center', templet: function (res) {
                        if (res.taskState == '0') {
                            return '未填报';
                        } else if (res.taskState == '1') {
                            return '分公司审核中';
                        } else if (res.taskState == '2') {
                            return '分公司驳回调整';
                        } else if (res.taskState == '3') {
                            return '责任部门审核中';
                        } else if (res.taskState == '4') {
                            return '责任部门驳回调整';
                        } else if (res.taskState == '5') {
                            return '审核完成';
                        }
                    }
                },

            ]
        ]

        //table表单列表
        table.render({
            elem: '#fillplan-table',
            url: MODULE_PATH + 'listbySub/' + evaluationId+'/'+fkSubcompanyId+'/0',
            page: true,
            method: 'get',
            cols: cols,
            skin: 'line',
            toolbar: '#fillplan-toolbar',
            defaultToolbar: [{
                layEvent: 'refresh',
                icon: 'layui-icon-refresh',
            }]
        });


        //查询按钮绑定
        form.on('submit(fillplan-query)', function (data) {
            table.reload('fillplan-table', {where: data.field})
            return false;
        });

        //table工具栏绑定
        table.on('toolbar(fillplan-table)', function (obj) {
            if (obj.event === 'add') {
                window.add();
            } else if (obj.event === 'refresh') {
                window.refresh();
            } else if (obj.event === 'batchRemove') {
                window.batchRemove(obj);
            }
        });


        //刷新按钮
        window.refresh = function () {
            table.reload('fillplan-table');
        }
    })
</script>
</html>